home *** CD-ROM | disk | FTP | other *** search
/ Invenzioni & Inventori / Invenzioni and Inventori (Eclectica Publishing) (1996).ISO / invenzio / citta / mi087.dir / 00560_Script_560 < prev    next >
Text File  |  1983-01-27  |  30KB  |  940 lines

  1. ----- super_corr
  2.  
  3. on super_corr
  4.   set lab to the labellist
  5.   --  put lab
  6.   crea_init
  7.   inizializza
  8.   cambia_hilite
  9.   controlla_var_vuote
  10.   cambia_script_audio
  11.   spegni_su_icone
  12.   corr_curs
  13.   
  14.   go "menu"
  15.   set mar to marker(0)
  16.   commenta mar
  17.   set num_script to the framescript
  18.   set pgm to the scripttext of member num_script
  19.   set pgm_new to the scripttext of cast "menu_1m"
  20.   set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  21.   --   set the scripttext of member num_script to scommenta(pgm_new) & return
  22.   
  23.   
  24.   set mar to mar +1
  25.   commenta mar
  26.   set num_script to the framescript
  27.   set pgm to the scripttext of member num_script
  28.   set pgm_new to the scripttext of member "menu_2m"
  29.   set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  30.   
  31.   --  go "viaggio"
  32.   --  set mar to marker(0)
  33.   --  commenta mar
  34.   --  set num_script to the framescript
  35.   --  set pgm to the scripttext of member num_script
  36.   --  set pgm_new to the scripttext of member "viaggio_1m"
  37.   --  set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  38.   --  
  39.   --  set mar to mar +1
  40.   --  commenta mar
  41.   --  set num_script to the framescript
  42.   --  set pgm to the scripttext of member num_script
  43.   --  set pgm_new to the scripttext of member "viaggio_2m"
  44.   --  set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  45.   --  
  46.   --  set mar to mar +1
  47.   --  commenta mar
  48.   --  set num_script to the framescript
  49.   --  set pgm to the scripttext of member num_script
  50.   --  set pgm_new to the scripttext of member "viaggio_3m"
  51.   --  set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  52.   
  53.   go "chiuso"
  54.   set mar to marker(0)
  55.   commenta mar
  56.   set num_script to the framescript
  57.   set pgm to the scripttext of member num_script
  58.   set pgm_new to the scripttext of member "chiuso_1m"
  59.   set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  60.   
  61.   set mar to mar +1
  62.   commenta mar
  63.   set num_script to the framescript
  64.   set pgm to the scripttext of member num_script
  65.   set pgm_new to the scripttext of member "chiuso_2m"
  66.   set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  67.   
  68.   set mar to mar +1
  69.   commenta mar
  70.   set num_script to the framescript
  71.   set pgm to the scripttext of member num_script
  72.   set pgm_new to the scripttext of member "chiuso_3m"
  73.   set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  74.   
  75.   if offset("principio",lab) > 0 then
  76.     go "principio"
  77.     set mar to marker(0)
  78.     commenta mar
  79.     set num_script to the framescript
  80.     set pgm to the scripttext of member num_script
  81.     set pgm_new to the scripttext of member "principio_1m"
  82.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  83.     
  84.     set mar to mar +1
  85.     commenta mar
  86.     set num_script to the framescript
  87.     set pgm to the scripttext of member num_script
  88.     set pgm_new to the scripttext of member "principio_2m"
  89.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  90.     
  91.     set mar to mar +1
  92.     commenta mar
  93.     set num_script to the framescript
  94.     set pgm to the scripttext of member num_script
  95.     set pgm_new to the scripttext of member "principio_3m"
  96.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  97.     
  98.   end if
  99.   
  100.   if offset("articolo",lab) > 0 then
  101.     go "articolo"
  102.     set mar to marker(0)
  103.     commenta mar
  104.     set num_script to the framescript
  105.     set pgm to the scripttext of member num_script
  106.     set pgm_new to the scripttext of member "articolo_1m"
  107.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  108.     
  109.     set mar to mar +1
  110.     commenta mar
  111.     set num_script to the framescript
  112.     set pgm to the scripttext of member num_script
  113.     set pgm_new to the scripttext of member "articolo_2m"
  114.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  115.     
  116.     set mar to mar +1
  117.     commenta mar
  118.     set num_script to the framescript
  119.     set pgm to the scripttext of member num_script
  120.     set pgm_new to the scripttext of member "articolo_3m"
  121.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  122.     
  123.   end if
  124.   
  125.   if offset("viaggio",lab) > 0 then
  126.     go "viaggio"
  127.     set mar to marker(0)
  128.     commenta mar
  129.     set num_script to the framescript
  130.     set pgm to the scripttext of member num_script
  131.     set pgm_new to the scripttext of member "viaggio_1m"
  132.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  133.     
  134.     set mar to mar +1
  135.     commenta mar
  136.     set num_script to the framescript
  137.     set pgm to the scripttext of member num_script
  138.     set pgm_new to the scripttext of member "viaggio_2m"
  139.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  140.     
  141.     set mar to mar +1
  142.     commenta mar
  143.     set num_script to the framescript
  144.     set pgm to the scripttext of member num_script
  145.     set pgm_new to the scripttext of member "viaggio_3m"
  146.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  147.     
  148.   end if
  149.   
  150.   
  151.   if offset("video",lab) > 0 then
  152.     go "video"
  153.     set mar to marker(0)
  154.     commenta mar
  155.     set num_script to the framescript
  156.     set pgm to the scripttext of member num_script
  157.     set pgm_new to the scripttext of member "video_1m"
  158.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  159.     
  160.     set mar to mar +1
  161.     commenta mar
  162.     set num_script to the framescript
  163.     set pgm to the scripttext of member num_script
  164.     set pgm_new to the scripttext of member "video_2m"
  165.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  166.     
  167.     set mar to mar +1
  168.     commenta mar
  169.     set num_script to the framescript
  170.     set pgm to the scripttext of member num_script
  171.     set pgm_new to the scripttext of member "video_3m"
  172.     set the scripttext of member num_script to pgm & return & return & scommenta(pgm_new) & return
  173.     
  174.   end if
  175.   
  176.   
  177.   
  178. end
  179.  
  180.  
  181. on crea_init
  182.   set lab to the labellist
  183.   set stringa to ""
  184.   
  185.   
  186.   set stringa to ins_frase  (stringa,"", "on inizializza")
  187.   
  188.   set stringa to ins_frase  (stringa,"", "global canale_video,Canale_pallina,canale_audio,canale_articolo,canale_principio")
  189.   set stringa to ins_frase  (stringa,"", "global pallina_chiusa,pallina_aperta,audio_nonbarrato,audio_barrato,video_aperto,testo_aperto,principio_aperto")
  190.   set stringa to ins_frase  (stringa,"", "global video_esterno,audio_intro")
  191.   set stringa to ins_frase  (stringa,"", "global At_hil_dacast,at_hil_quanti,at_hil_sprite")
  192.   set stringa to ins_frase  (stringa,"", "global Viff_da,viff_a")
  193.   set stringa to ins_frase  (stringa,"", "global lista_en_menu,lista_en_viaggio,lista_en_chiuso,lista_en_articolo,lista_en_principio,lista_en_video")
  194.   set stringa to ins_frase  (stringa,"", "global dove_articolo,dove_principio,dove_video")
  195.   set stringa to ins_frase  (stringa,"", "global video_bool,principio_bool,albero_bool,testo_bool,audio_bool,correlati_bool,viaggio_bool,inventore_bool")
  196.   set stringa to ins_frase  (stringa,"", "global lista_curan,lista_curap,lista_curnu")
  197.   set stringa to ins_frase  (stringa,"", "global Att_hilitec_dacast,att_hilitec_quanti,att_hilitec_sprite")
  198.   set stringa to ins_frase  (stringa,"", "global olddove")
  199.   set stringa to ins_frase  (stringa,"", "set olddove to 0")
  200.   
  201.   
  202.   
  203.   
  204.   
  205.   
  206.   
  207.   
  208.   
  209.   
  210.   
  211.   
  212.   
  213.   
  214.   -- canale_video Φ lo sprite dove Φ messa l'icona video 
  215.   -- se presente vale il numero del canale altrimenti 0
  216.   set canale_video to 0
  217.   go "menu"
  218.   repeat with x=1 to 48
  219.     set y to the castnum of sprite x
  220.     if y>0 and y<1000 then
  221.       set nome to the name of cast y
  222.       if offset("cur",nome)>0 then
  223.         set canale_video to x
  224.         exit repeat
  225.       end if
  226.     end if
  227.     
  228.   end repeat
  229.   set stringa to ins_frase  (stringa,"", "set canale_video to "& canale_video)
  230.   -- put stringa
  231.   
  232.   -- canale_pallina Φ lo sprite dove Φ messa l'icona pallina 
  233.   -- se presente vale il numero del canale altrimenti 0
  234.   set canale_pallina to 0
  235.   go "menu"
  236.   repeat with x=1 to 48
  237.     set y to the castnum of sprite x
  238.     if y>0 and y<1000 then
  239.       set nome to the name of cast y
  240.       if offset("sfe",nome)>0 then
  241.         set canale_pallina to x
  242.         exit repeat
  243.       end if
  244.     end if
  245.     
  246.   end repeat
  247.   set stringa to ins_frase  (stringa,"", "set canale_pallina to "& canale_pallina)
  248.   --put stringa
  249.   
  250.   -- canale_audio Φ lo sprite dove Φ messa l'icona audio 
  251.   -- se presente vale il numero del canale altrimenti 0
  252.   set canale_audio to 0
  253.   go "menu"
  254.   repeat with x=1 to 48
  255.     set y to the castnum of sprite x
  256.     if y>0 and y<1000 then
  257.       set nome to the name of cast y
  258.       if offset("aud",nome)>0 then
  259.         set canale_audio to x
  260.         exit repeat
  261.       end if
  262.     end if
  263.     
  264.   end repeat
  265.   set stringa to ins_frase  (stringa,"", "set canale_audio to "& canale_audio)
  266.   
  267.   -- canale_articolo Φ lo sprite dove Φ messa l'icona audio 
  268.   -- se presente vale il numero del canale altrimenti 0
  269.   set canale_audio to 0
  270.   go "menu"
  271.   repeat with x=1 to 48
  272.     set y to the castnum of sprite x
  273.     if y>0 and y<1000 then
  274.       set nome to the name of cast y
  275.       if offset("tes",nome)>0 then
  276.         set canale_articolo to x
  277.         exit repeat
  278.       end if
  279.     end if
  280.     
  281.   end repeat
  282.   set stringa to ins_frase  (stringa,"", "set canale_articolo to "& canale_articolo)
  283.   
  284.   
  285.   -- canale_principio Φ lo sprite dove Φ messa l'icona audio 
  286.   -- se presente vale il numero del canale altrimenti 0
  287.   set canale_principio to 0
  288.   go "menu"
  289.   repeat with x=1 to 48
  290.     set y to the castnum of sprite x
  291.     if y>0 and y<1000 then
  292.       set nome to the name of cast y
  293.       if offset("pri",nome)>0 then
  294.         set canale_principio to x
  295.         exit repeat
  296.       end if
  297.     end if
  298.     
  299.   end repeat
  300.   set stringa to ins_frase  (stringa,"", "set canale_principio to "& canale_principio)
  301.   
  302.   
  303.   -- put stringa
  304.   
  305.   
  306.   -- pallina_chiusa vale il numero del cast dove Φ messa la
  307.   -- pallina chiusa
  308.   -- se presente vale il numero del cast altrimenti 0
  309.   set pallina_chiusa to 0
  310.   repeat with x=1 to 10000
  311.     if the type of member x = #bitmap then
  312.       set nome to the name of cast x
  313.       
  314.       if offset("sfe_I",nome)>0 then
  315.         set pallina_chiusa to x
  316.         exit repeat
  317.       end if
  318.     end if
  319.     
  320.   end repeat
  321.   set stringa to ins_frase  (stringa,"", "set pallina_chiusa to "& pallina_chiusa)
  322.   
  323.   
  324.   -- pallina_aperta vale il numero del cast dove Φ messa la
  325.   -- pallina aperta
  326.   -- se presente vale il numero del cast altrimenti 0
  327.   set pallina_aperta to 0
  328.   repeat with x=1 to 10000
  329.     if the type of member x = #bitmap then
  330.       set nome to the name of cast x
  331.       
  332.       if offset("sfe_S",nome)>0 then
  333.         set pallina_aperta to x
  334.         exit repeat
  335.       end if
  336.     end if
  337.     
  338.   end repeat
  339.   set stringa to ins_frase  (stringa,"", "set pallina_aperta to "& pallina_aperta)
  340.   
  341.   -- audio_nonbarrato vale il numero del cast dove Φ messa l'
  342.   -- audio chiuso (altoparlante SENZA croce)
  343.   -- se presente vale il numero del cast altrimenti 0
  344.   set audio_nonbarrato to 0
  345.   repeat with x=1 to 10000
  346.     if the type of member x = #bitmap then
  347.       set nome to the name of cast x
  348.       
  349.       if offset("aud_I",nome)>0 then
  350.         set audio_nonbarrato to x
  351.         exit repeat
  352.       end if
  353.     end if
  354.     
  355.   end repeat
  356.   set stringa to ins_frase  (stringa,"", "set audio_nonbarrato to "& audio_nonbarrato)
  357.   
  358.   
  359.   -- audio_barrato vale il numero del cast dove Φ messa la
  360.   -- audio_barrato (Altoparlante CON la croce)
  361.   -- se presente vale il numero del cast altrimenti 0
  362.   set audio_barrato to 0
  363.   repeat with x=1 to 10000
  364.     if the type of member x = #bitmap then
  365.       set nome to the name of cast x
  366.       
  367.       if offset("aud_O",nome)>0 then
  368.         set audio_barrato to x
  369.         exit repeat
  370.       end if
  371.     end if
  372.     
  373.   end repeat
  374.   set stringa to ins_frase  (stringa,"", "set audio_barrato to "& audio_barrato)
  375.   
  376.   
  377.   -- video_aperto vale il numero del cast dove Φ messa la
  378.   -- video_aperto (Altoparlante CON la croce)
  379.   -- se presente vale il numero del cast altrimenti 0
  380.   set video_aperto to 0
  381.   repeat with x=1 to 10000
  382.     if the type of member x = #bitmap then
  383.       set nome to the name of cast x
  384.       
  385.       if offset("spazio",nome)>0 or offset("h_cur",nome)>0 then
  386.         set video_aperto to x
  387.         exit repeat
  388.       end if
  389.     end if
  390.     
  391.   end repeat
  392.   set stringa to ins_frase  (stringa,"", "set video_aperto to "& video_aperto)
  393.   
  394.   -- testo_aperto vale il numero del cast dove Φ messa la
  395.   
  396.   -- se presente vale il numero del cast altrimenti 0
  397.   set testo_aperto to 0
  398.   repeat with x=1 to 10000
  399.     if the type of member x = #bitmap then
  400.       set nome to the name of cast x
  401.       
  402.       if offset("H_TESTO",nome)>0 then
  403.         set testo_aperto to x
  404.         exit repeat
  405.       end if
  406.     end if
  407.     
  408.   end repeat
  409.   set stringa to ins_frase  (stringa,"", "set testo_aperto to "& testo_aperto)
  410.   
  411.   -- principio_aperto vale il numero del cast dove Φ messa la
  412.   -- se presente vale il numero del cast altrimenti 0
  413.   set principio_aperto to 0
  414.   repeat with x=1 to 10000
  415.     if the type of member x = #bitmap then
  416.       set nome to the name of cast x
  417.       
  418.       if offset("H_PRI",nome)>0 then
  419.         set principio_aperto to x
  420.         exit repeat
  421.       end if
  422.     end if
  423.     
  424.   end repeat
  425.   set stringa to ins_frase  (stringa,"", "set principio_aperto to "& principio_aperto)
  426.   
  427.   
  428.   
  429.   
  430.   
  431.   -- audio_intro Φ il nome del file dell'audio introduttivo
  432.   -- se presente vale il nome del file  altrimenti ""
  433.   
  434.   set audio_intro to ""
  435.   go "menu"
  436.   set num_script to the framescript
  437.   set pgm to the scripttext of member num_script
  438.   set off1 to offset (" suono ",pgm)
  439.   delete char 1 to off1 of pgm
  440.   set off2 to offset (QUOTE,pgm)
  441.   delete char 1 to off2 of pgm
  442.   set off3 to offset (QUOTE,pgm)
  443.   if off1>0 and off2>0 and off3>0 then
  444.     set audio_intro to char 1 to off3-1 of pgm
  445.   end if
  446.   
  447.   
  448.   set stringa to ins_frase  (stringa,"", "set audio_intro to "& QUOTE & audio_intro & QUOTE)
  449.   
  450.   
  451.   
  452.   -- video_esterno vale il nome del video storico
  453.   -- se presente vale il nome del file .MOV altrimenti ""
  454.   set video_esterno to ""
  455.   repeat with x=1 to 10000
  456.     if the type of member x = #digitalvideo then
  457.       set nome to the name of cast x
  458.       
  459.       if char 1 of nome= "V" then
  460.         set video_esterno to nome
  461.         exit repeat
  462.       end if
  463.     end if
  464.     
  465.   end repeat
  466.   set stringa to ins_frase  (stringa,"", "set video_esterno to " & QUOTE &  video_esterno & QUOTE)
  467.   
  468.   
  469.   
  470.   -- at_hil_dacast = primo parametro della funzione AT_HIL
  471.   -- at_hil_quanti = secondo parametro della funzione AT_HIL
  472.   -- at_hil_sprite = terzo parametro della funzione AT_HIL
  473.   
  474.   set at_hil_dacast to 0
  475.   set at_hil_quanti to 0
  476.   set at_hil_sprite to 0
  477.   if offset("viaggio",lab)> 0 then
  478.     
  479.     go "viaggio"
  480.     set mar to marker(0)
  481.     set mar to mar+2
  482.     go mar
  483.     
  484.     
  485.     set num_script to the framescript
  486.     set pgm to the scripttext of member num_script
  487.     set off1 to offset ("at_hil",pgm)
  488.     delete char 1 to off1 of pgm
  489.     set off2 to offset (" ",pgm)
  490.     delete char 1 to off2 of pgm
  491.     set off3 to offset (return,pgm)
  492.     if off1>0 and off2>0 and off3>0 then
  493.       set str to char 1 to off3-1 of pgm
  494.       set off4 to offset(",",pgm)
  495.       set num1 to char 1 to off4-1 of pgm
  496.       set at_hil_dacast to value(num1)
  497.       set stringa to ins_frase  (stringa,"", "set at_hil_dacast to " & at_hil_dacast)
  498.       delete char 1  to off4 of pgm
  499.       
  500.       set off4 to offset(",",pgm)
  501.       set num1 to char 1 to off4-1 of pgm
  502.       set at_hil_quanti to value(num1)
  503.       set stringa to ins_frase  (stringa,"", "set at_hil_quanti to " & at_hil_quanti)
  504.       delete char 1  to off4 of pgm
  505.       
  506.       
  507.       set num1 to pgm
  508.       set at_hil_sprite to value(num1)
  509.       set stringa to ins_frase  (stringa,"", "set at_hil_sprite to " & at_hil_sprite)
  510.       
  511.       
  512.       
  513.     end if
  514.     
  515.   end if
  516.   
  517.   
  518.   
  519.   
  520.   
  521.   
  522.   -- viff_da = primo parametro della funzione VIFF (nel marker 1 di viaggio)
  523.   -- viff_a = secondo parametro della funzione VIFF (nel marker 1 di viaggio)
  524.   
  525.   
  526.   set viff_da to 0
  527.   set viff_a to 0
  528.   if offset("viaggio",lab)> 0 then
  529.     
  530.     go "viaggio"
  531.     set mar to marker(0)
  532.     set mar to mar+1
  533.     go mar
  534.     
  535.     
  536.     
  537.     
  538.     repeat with x=19 to 48
  539.       set y to the castnum of sprite x
  540.       if y>0 and y<1000 then
  541.         if viff_da = 0 then
  542.           set viff_da to x
  543.         end if
  544.         
  545.       else
  546.         if viff_da>0 and viff_a =0 then
  547.           set viff_a to x-1
  548.           exit repeat
  549.         end if
  550.       end if
  551.       
  552.     end repeat
  553.   end if
  554.   
  555.   set stringa to ins_frase  (stringa,"", "set viff_da to "& viff_da)
  556.   set stringa to ins_frase  (stringa,"", "set viff_a to "& viff_a)
  557.   
  558.   
  559.   
  560.   
  561.   -- att_hilitec_dacast = primo parametro della funzione ATT_HILITEC
  562.   -- att_hilitec_quanti = secondo parametro della funzione ATT_HILITEC
  563.   -- att_hilitec_sprite = terzo parametro della funzione ATT_HILITEC
  564.   
  565.   set att_hilitec_dacast to 0
  566.   set att_hilitec_quanti to 0
  567.   set att_hilitec_sprite to 0
  568.   if offset("viaggio",lab)> 0 then
  569.     
  570.     go "viaggio"
  571.     set mar to marker(0)
  572.     set mar to mar+2
  573.     go mar
  574.     
  575.     
  576.     set num_script to the framescript
  577.     set pgm to the scripttext of member num_script
  578.     if offset("Att_hilite",pgm)>0 and offset("att_hilitec",pgm)=0 then
  579.       -- vecchio caso con ATT_HILITE
  580.       set off1 to offset ("att_hilite",pgm)
  581.       delete char 1 to off1 of pgm
  582.       set off2 to offset (" ",pgm)
  583.       delete char 1 to off2 of pgm
  584.       set off3 to offset (return,pgm)
  585.       if off1>0 and off2>0 and off3>0 then
  586.         set str to char 1 to off3-1 of pgm
  587.         set off4 to offset(",",pgm)
  588.         set num1 to char 1 to off4-1 of pgm
  589.         set att_hilitec_dacast to value(num1)
  590.         set stringa to ins_frase  (stringa,"", "set att_hilitec_dacast to " & att_hilitec_dacast)
  591.         delete char 1  to off4 of pgm
  592.         
  593.         set off4 to offset(",",pgm)
  594.         set num1 to char 1 to off4-1 of pgm
  595.         delete char 1  to off4 of pgm
  596.         
  597.         set off4 to offset(",",pgm)
  598.         set num1 to char 1 to off4-1 of pgm
  599.         
  600.         set att_hilitec_sprite to att_hilitec_dacast - value(num1)
  601.         set stringa to ins_frase  (stringa,"", "set att_hilitec_sprite to " & att_hilitec_sprite)
  602.         delete char 1  to off4 of pgm
  603.         
  604.         
  605.         set off4 to offset(",",pgm)
  606.         set num1 to char 1 to off4-1 of pgm
  607.         set att_hilitec_quanti to value(num1)
  608.         set stringa to ins_frase  (stringa,"", "set att_hilitec_quanti to " & att_hilitec_quanti)
  609.       END IF 
  610.     else
  611.       
  612.       if offset("ATT_HILITEC",pgm)> 0 then 
  613.         -- caso nuovo con ATT_HILITEC
  614.         
  615.         set off1 to offset ("att_hilitec",pgm)
  616.         delete char 1 to off1 of pgm
  617.         set off2 to offset (" ",pgm)
  618.         delete char 1 to off2 of pgm
  619.         set off3 to offset (return,pgm)
  620.         if off1>0 and off2>0 and off3>0 then
  621.           set str to char 1 to off3-1 of pgm
  622.           set off4 to offset(",",str)
  623.           set num1 to char 1 to off4-1 of str
  624.           set att_hilitec_dacast to value(num1)
  625.           set stringa to ins_frase  (stringa,"", "set att_hilitec_dacast to " & att_hilitec_dacast)
  626.           delete char 1  to off4 of str
  627.           
  628.           set off4 to offset(",",str)
  629.           set num1 to char 1 to off4-1 of str
  630.           set att_hilitec_quanti to value(num1)
  631.           set stringa to ins_frase  (stringa,"", "set att_hilitec_quanti to " & att_hilitec_quanti)
  632.           delete char 1  to off4 of str
  633.           
  634.           
  635.           set num1 to str
  636.           set att_hilitec_sprite to value(num1)
  637.           set stringa to ins_frase  (stringa,"", "set att_hilitec_sprite to " & att_hilitec_sprite)
  638.           
  639.           
  640.           
  641.         end if
  642.         
  643.         
  644.         
  645.         
  646.       end if
  647.     end if
  648.   end if
  649.   
  650.   -- dove_articolo setta la variabile DOVE in articolo
  651.   -- dove_principio setta la variabile DOVE in principio
  652.   -- dove_video setta la variabile DOVE in video
  653.   
  654.   set dove_articolo to 0
  655.   set dove_principio to 0
  656.   set dove_video to 0
  657.   set conta to 1
  658.   
  659.   repeat with x=at_hil_dacast to at_hil_dacast+at_hil_quanti
  660.     set nome to the name of cast x
  661.     if offset("CUR",nome) >0 then set dove_video to conta
  662.     if offset("PRI",nome) >0 then set dove_principio to conta
  663.     if offset("TES",nome) >0 then set dove_articolo to conta
  664.     set conta to conta+1
  665.   end repeat
  666.   
  667.   set stringa to ins_frase  (stringa,"", "set dove_video to " & dove_video)
  668.   set stringa to ins_frase  (stringa,"", "set dove_principio to " & dove_principio)
  669.   set stringa to ins_frase  (stringa,"", "set dove_articolo to " & dove_articolo)
  670.   
  671.   
  672.   
  673.   -- video = 1 se Φ presente il video 0 altrimenti
  674.   -- principio = 1 se Φ presente il principio 0 altrimenti
  675.   -- albero = 1 se Φ presente il albero 0 altrimenti
  676.   -- testo = 1 se Φ presente il testo 0 altrimenti
  677.   -- audiobool = 1 se Φ presente il audio 0 altrimenti
  678.   -- correlati = 1 se Φ presente il correlati 0 altrimenti
  679.   -- viaggio = 1 se Φ presente il viaggio 0 altrimenti
  680.   
  681.   set video_bool to 0
  682.   set principio_bool to 0
  683.   set albero_bool to 0
  684.   set testo_bool to 0
  685.   set audio_bool to 0
  686.   set correlati_bool to 0
  687.   set viaggio_bool to 0
  688.   set inventore_bool to 0
  689.   
  690.   if video_esterno <>"" and dove_video>0 then set video_bool to 1
  691.   if dove_principio>0 then set principio_bool to 1
  692.   if dove_articolo >0 then set testo_bool to 1
  693.   if offset("viaggio",lab)>0 then set viaggio_bool to 1
  694.   go "menu"
  695.   repeat with x=1 to 48
  696.     set y to the castnum of sprite x
  697.     if y>0 and y<1000 then
  698.       set nome to the name of cast y
  699.       if offset("alb",nome)>0 then
  700.         set albero_bool to 1
  701.         exit repeat
  702.       end if
  703.     end if
  704.     
  705.   end repeat
  706.   
  707.   go "menu"
  708.   repeat with x=1 to 48
  709.     set y to the castnum of sprite x
  710.     if y>0 and y<1000 then
  711.       set nome to the name of cast y
  712.       if offset("art",nome)>0 then
  713.         set correlati_bool to 1
  714.         exit repeat
  715.       end if
  716.     end if
  717.     
  718.   end repeat
  719.   
  720.   go "menu"
  721.   repeat with x=1 to 48
  722.     set y to the castnum of sprite x
  723.     if y>0 and y<1000 then
  724.       set nome to the name of cast y
  725.       if offset("inv",nome)>0 then
  726.         set inventore_bool to 1
  727.         exit repeat
  728.       end if
  729.     end if
  730.     
  731.   end repeat
  732.   
  733.   
  734.   if audio_intro <> "" then set audio_bool to 1
  735.   
  736.   
  737.   
  738.   set stringa to ins_frase  (stringa,"", "set video_bool to "& video_bool)
  739.   set stringa to ins_frase  (stringa,"", "set audio_bool to "& audio_bool)
  740.   set stringa to ins_frase  (stringa,"", "set testo_bool to "& testo_bool)
  741.   set stringa to ins_frase  (stringa,"", "set principio_bool to "& principio_bool)
  742.   set stringa to ins_frase  (stringa,"", "set correlati_bool to "& correlati_bool)
  743.   set stringa to ins_frase  (stringa,"", "set viaggio_bool to "& viaggio_bool)
  744.   set stringa to ins_frase  (stringa,"", "set inventore_bool to "& inventore_bool)
  745.   set stringa to ins_frase  (stringa,"", "set albero_bool to "& albero_bool)
  746.   
  747.   
  748.   
  749.   
  750.   
  751.   
  752.   
  753.   -- lista_en_menu lista per attivare la funzione ENTRATA in MENU
  754.   -- lista_en_viaggio lista per attivare la funzione ENTRATA in VIAGGIO
  755.   -- lista_en_chiuso lista per attivare la funzione ENTRATA in CHIUSO
  756.   -- lista_en_articolo lista per attivare la funzione ENTRATA in ARTICOLO
  757.   -- lista_en_principio lista per attivare la funzione ENTRATA in PRINCIPIO
  758.   -- lista_en_video lista per attivare la funzione ENTRATA in VIDEO
  759.   
  760.   set lista_en_menu to []
  761.   set lista_en_viaggio to []
  762.   set lista_en_chiuso to []
  763.   set lista_en_articolo to []
  764.   set lista_en_principio to []
  765.   set lista_en_video to []
  766.   
  767.   if offset("menu",lab) then set lista_en_menu to crea_lista ("menu")
  768.   if offset("viaggio",lab) then set lista_en_viaggio to crea_lista ("viaggio")
  769.   if offset("chiuso",lab) then set lista_en_chiuso to crea_lista ("chiuso")
  770.   if offset("articolo",lab) then set lista_en_articolo to crea_lista ("articolo")
  771.   if offset("principio",lab) then set lista_en_principio to crea_lista ("principio")
  772.   if offset("video",lab) then set lista_en_video to crea_lista ("video")
  773.   
  774.   set stringa to ins_frase  (stringa,"", "set lista_en_menu to " & lista_en_menu)
  775.   set stringa to ins_frase  (stringa,"", "set lista_en_chiuso to " & lista_en_chiuso)
  776.   set stringa to ins_frase  (stringa,"", "set lista_en_articolo to " & lista_en_articolo)
  777.   set stringa to ins_frase  (stringa,"", "set lista_en_principio to " & lista_en_principio)
  778.   set stringa to ins_frase  (stringa,"", "set lista_en_viaggio to " & lista_en_viaggio)
  779.   set stringa to ins_frase  (stringa,"", "set lista_en_video to " & lista_en_video)
  780.   
  781.   -- lista_curan e lista_curap sono liste di valori di curan e curap 
  782.   -- presi dal marker 1 di viaggio
  783.   
  784.   set lista_curan to []
  785.   set lista_curap to []
  786.   set lista_curnu to []
  787.   
  788.   if offset("viaggio",lab)> 0 then
  789.     
  790.     go "viaggio"
  791.     
  792.     
  793.     set num_script to the framescript
  794.     set pgm to the scripttext of member num_script
  795.     repeat while pgm<>""
  796.       set linea to estrai_linea (pgm)
  797.       
  798.       set pgm to elimina_linea(pgm)
  799.       -- if offset ("curan",linea)>0 and offset("--",linea)=0 then
  800.       if offset ("curan",linea)>0  then
  801.         set off1 to offset("curan",linea)
  802.         delete char 1 to off1 of linea
  803.         set off1 to offset(" ",linea)
  804.         delete char 1 to off1 of linea
  805.         set valore to value(linea)
  806.         if valore >=1 and valore <=48 then
  807.           add lista_curan, valore
  808.         end if
  809.       end if
  810.       --     if offset ("curap",linea)>0 and offset("--",linea)=0 then
  811.       if offset ("curap",linea)>0 then
  812.         set off1 to offset("curap",linea)
  813.         delete char 1 to off1 of linea
  814.         set off1 to offset(" ",linea)
  815.         delete char 1 to off1 of linea
  816.         set valore to value(linea)
  817.         if valore >=1 and valore <=48 then
  818.           add lista_curap, valore
  819.         end if
  820.       end if
  821.       
  822.       
  823.     end repeat
  824.     
  825.   end if
  826.   
  827.   
  828.   
  829.   
  830.   
  831.   set stringa to ins_frase  (stringa,"", "set lista_curan to " & lista_curan)
  832.   set stringa to ins_frase  (stringa,"", "set lista_curap to " & lista_curap)
  833.   set stringa to ins_frase  (stringa,"", "set lista_curnu to " & lista_curnu)
  834.   
  835.   
  836.   
  837.   
  838.   
  839.   set stringa to ins_frase  (stringa,"", "end" )
  840.   
  841.   put stringa
  842.   repeat with x=1 to 10000
  843.     
  844.     if the type of member x = #script then
  845.       
  846.       set pgm to the scripttext of member x
  847.       if offset ("on super_corr",pgm) then
  848.         set n_cast to x
  849.         exit repeat
  850.       end if
  851.     end if
  852.     
  853.   end repeat
  854.   
  855.   if n_cast >0 then 
  856.     set off1 to offset(return & "-- xyz",pgm)
  857.     put off1
  858.     set pgm to char 1 to off1-1 of pgm
  859.     set new_str to pgm & return & return & "-- xyz *** NON TOGLIERE QUESTA RIGA"& return & return & return & stringa & return 
  860.     set the scripttext of member N_cast to new_str
  861.   end if
  862.   inizializza
  863.   
  864. end
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878. -- xyz *** NON TOGLIERE QUESTA RIGA
  879.  
  880.  
  881. on inizializza
  882.   global canale_video,Canale_pallina,canale_audio,canale_articolo,canale_principio
  883.   global pallina_chiusa,pallina_aperta,audio_nonbarrato,audio_barrato,video_aperto,testo_aperto,principio_aperto
  884.   global video_esterno,audio_intro
  885.   global At_hil_dacast,at_hil_quanti,at_hil_sprite
  886.   global Viff_da,viff_a
  887.   global lista_en_menu,lista_en_viaggio,lista_en_chiuso,lista_en_articolo,lista_en_principio,lista_en_video
  888.   global dove_articolo,dove_principio,dove_video
  889.   global video_bool,principio_bool,albero_bool,testo_bool,audio_bool,correlati_bool,viaggio_bool,inventore_bool
  890.   global lista_curan,lista_curap,lista_curnu
  891.   global Att_hilitec_dacast,att_hilitec_quanti,att_hilitec_sprite
  892.   global olddove
  893.   global dove_inventore
  894.   set dove_inventore to 4
  895.   set olddove to 0
  896.   set canale_video to 0
  897.   set canale_pallina to 40
  898.   set canale_audio to 39
  899.   set canale_articolo to 45
  900.   set canale_principio to 43
  901.   set pallina_chiusa to 123
  902.   set pallina_aperta to 121
  903.   set audio_nonbarrato to 117
  904.   set audio_barrato to 119
  905.   set video_aperto to 0
  906.   set testo_aperto to 115
  907.   set principio_aperto to 113
  908.   set audio_intro to "Ai087pe"
  909.   set video_esterno to ""
  910.   set at_hil_dacast to 105
  911.   set at_hil_quanti to 6
  912.   set at_hil_sprite to 41
  913.   set viff_da to 20
  914.   set viff_a to 23
  915.   set att_hilitec_dacast to 36
  916.   set att_hilitec_quanti to 4
  917.   set att_hilitec_sprite to 3
  918.   set dove_video to 0
  919.   set dove_principio to 3
  920.   set dove_articolo to 5
  921.   set video_bool to 0
  922.   set audio_bool to 1
  923.   set testo_bool to 1
  924.   set principio_bool to 1
  925.   set correlati_bool to 1
  926.   set viaggio_bool to 1
  927.   set inventore_bool to 1
  928.   set albero_bool to 0
  929.   set lista_en_menu to [1, 3, 39, 47]
  930.   set lista_en_chiuso to [1, 3, 39, 47]
  931.   set lista_en_articolo to [1, 5, 15, 16, 18, 19, 39, 47]
  932.   set lista_en_principio to [1, 4, 6, 8, 39, 47]
  933.   set lista_en_viaggio to [1, 7, 20, 23, 39, 47]
  934.   set lista_en_video to []
  935.   set lista_curan to [4]
  936.   set lista_curap to [3, 5]
  937.   set lista_curnu to []
  938. end
  939.  
  940.